import { HashRouter } from "react-router-dom";
import Router from "@/routers";
import { App as AntdApp, ConfigProvider } from "antd";
import { AuthRoute } from "./components/AuthRoute";
import { TitleListener } from "./components/TitleListener";
function App() {
  return (
    <HashRouter>
      <AuthRoute>
        <ConfigProvider
          theme={{
            token: {
              colorPrimary: "#fa8c16", // 主色：橙色
              colorPrimaryHover: "#ffa940", // 主色 Hover
              colorPrimaryActive: "#d46b08", // 主色 Active
              colorInfo: "#fa8c16", // info 色也用橙色
              colorSuccess: "#52c41a", // 保持默认成功色
              colorWarning: "#faad14", // 保持默认警告色
              colorError: "#f5222d", // 保持默认错误色
              colorLink: "#fa8c16", // 链接用橙色
              colorText: "#333333", // 文字颜色
              colorTextSecondary: "#595959", // 二级文字
              colorBgBase: "#fffaf0", // 页面背景色：浅橙偏米
              colorBgContainer: "#ffffff", // 容器背景：纯白
              colorBorder: "#f0f0f0", // 边框颜色：浅灰
              borderRadius: 6, // 圆角
              fontSize: 14, // 基础字号
            },
            components: {
              Button: {
                colorPrimary: "#fa8c16",
                colorPrimaryHover: "#ffa940",
                colorPrimaryActive: "#d46b08",
              },
              Input: {
                colorBgContainer: "#fff7e6",
              },
              InputNumber: {
                colorBgContainer: "#fff7e6",
              },
              Select: {
                colorBgContainer: "#fff7e6",
              },
              Card: {
                colorBgContainer: "#fffaf0",
              },
            },
          }}
        >
          <TitleListener></TitleListener>
          <AntdApp>
            <Router />
          </AntdApp>
        </ConfigProvider>
      </AuthRoute>
    </HashRouter>
  );
}

export default App;
